package org.activequant.data.retrieval;

import org.activequant.core.domainmodel.InstrumentSpecification;
import org.activequant.core.domainmodel.data.TickerNews;
/**
 * Interface for a live ticker news data feed.<br>
 * An interface. Defines the following methods:
 * <ul>
 * <li>ISubscription&lt;TickerNews&gt; subscribe(InstrumentSpecification spec) throws Exception;</li>
 * <li>ISubscription&lt;TickerNews&gt;[] getSubscriptions();</li>
 * </ul>
 */
public interface ITickerNewsSubscriptionSource {

	/**
	 * Subscribes a new ticker news subscription for a specific instrument.
	 * @param spec
	 * @return
	 * @throws Exception
	 */
	ISubscription<TickerNews> subscribe(InstrumentSpecification spec) throws Exception;

	/**
	 * Returns collection of current subscriptions (excluding the canceled ones).
	 *
	 * @return subscriptions.
	 */
	ISubscription<TickerNews>[] getSubscriptions();

}